﻿
@{
    ViewBag.Title = "开立处方(医嘱)事前提醒";
    Layout = "~/Views/Shared/_Index.cshtml";
}

<div class="gridPanel">
    <table id="gridList"></table>
</div>

<script type="text/javascript">
    var sqtxdata = [];
    $(function () {
        sqtxdata = JSON.parse(sessionStorage.getItem('sqtxdataList'));
        gridList();
    });
    function gridList() { 
        var $gridList = $("#gridList");
        $gridList.jqGrid({
            datatype: 'local',
            data: sqtxdata,
            height: $(window).height() - 80,
            shrinkToFit: false,   //true:按比例初始化列宽度 false:使用colModel指定的宽度
            autowidth: true,
            rownumbers: false,  //是否显示序号
            unwritten: false,
            colModel: [
                { label: '处方号', name: 'AKC220', width: 80, align: 'center' },
                { label: '药品/项目编码', name: 'AKE001', width: 80, align: 'center' },
                { label: '医保药品/项目名称', name: 'AKE002', width: 120, align: 'center' },
                { label: '违反规则名称', name: 'BZE868', width: 80, align: 'center'},
                { label: '违规说明', name: 'AAE013', width: 150, align: 'center' },
                {
                    label: '违规级别', name: 'BAZ969', width: 60, align: 'center', formatter: function (cellvalue) {
                        return cellvalue == '01' ? '严重' : (cellvalue=='02' ? '警告':'提示')
                    }
                },
                {
                    label: '限制级别', name: 'BAZ970', width: 60, align: 'center', formatter: function (cellvalue) {
                        if(cellvalue=='1'){
                            return '禁忌';
                        } else if (cellvalue=='2')
                        {
                            return '不推荐';
                        } else if (cellvalue == '3') {
                            return '慎用';
                        } else if (cellvalue == '4') {
                            return '关注';
                        } else if (cellvalue == '5') {
                            return '安全';
                        }
                        else {
                            return cellvalue;
                        }
                    }
                }
            ]
        });
    };
</script>


